package AAA.dao.impl;

import AAA.dao.AccountDao;
import AAA.pojo.Account;
import AAA.utils.fz;
import org.apache.ibatis.session.SqlSession;

public class AccountDaoImpl  implements AccountDao {
    public Account selectByActno(String actno) {
        SqlSession sqlSession = fz.openSession();
        Account account = (Account) sqlSession.selectOne("account.selectByActno", actno);
        sqlSession.close();
        return  account;

    }

    public int updateByActno(Account act) {
        SqlSession sqlSession = fz.openSession();
        int count = sqlSession.update("account.selectByActno", act);
        sqlSession.commit();
        sqlSession.close();
        return count;
    }

}
